/* 
 * MCore Extensions for TTBlue
 * Creates a wrapper for TTAudioObjects that can be used to build an audio processing graph.
 * Copyright © 2008, Timothy Place
 * 
 * License: This code is licensed under the terms of the GNU LGPL
 * http://www.gnu.org/licenses/lgpl.html 
 */

#ifndef __MULTICORE_SOURCE_H__
#define __MULTICORE_SOURCE_H__

#include "multicore.h"


/**	MCoreSource is a very simple audio object that holds a signal from TTBlue
 that can be used by a MCore graph.		*/
class MULTICORE_EXPORT MCoreSource : public TTAudioObject
{
public:
	//TTAudioSignalPtr	buffer;			///< storage for the audioSignal that we provide
	TTAudioSignalArray*	buffers;	///< storage for the audioSignal(s) that we provide
	
	/**	Constructor. */
	MCoreSource(TTValue& arguments);
	
	/**	Destructor. */
	virtual ~MCoreSource();
	
	/**	A standard audio processing method as used by TTBlue objects.
		@param	inputs	unused.				*/
	TTErr processAudio(TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs);	
};

typedef MCoreSource* MCoreSourcePtr;


MULTICORE_EXPORT void MCoreInit(void);


#endif // __MULTICORE_SOURCE_H__
